<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { DocAlert, Page } from '@vben/common-ui';
const loading = ref(true); // 是否加载中

/** 初始化 */
const height = ref('');
const frameRef = ref<HTMLElement | null>(null);

function init() {
  height.value = `${document.documentElement.clientHeight - 94.5}px`;
  loading.value = false;
}

onMounted(() => {
  setTimeout(() => {
    init();
  }, 300);
});
</script>

<template>
  <Page auto-content-height>
    <template #doc>
      <DocAlert title="服务监控" url="https://doc.iocoder.cn/server-monitor/" />
    </template>

    <div v-loading="loading" :style="`height:${height}`">
    <iframe
      ref="frameRef"
      src="http://47.122.118.57:12162/login"
      style="width: 100%; height: 100%"
      frameborder="no"
      scrolling="auto"
    ></iframe>
  </div>
  </Page>
</template>
